//
//  YBLog.m
//  YBCoreSDK
//
//  Created by yiban on 16/1/25.
//  Copyright © 2016年 liuchengbin. All rights reserved.
//

#import "YBLog.h"

@interface YBLog ()

+ (void)logMessage:(const char *)func line:(int)line format:(NSString *)fmt valist:(va_list)args level:(NSString *)level;
@end

@implementation YBLog
@synthesize isDebug=_isDebug;

+ (void)yblogInfo:(const char *)func line:(int)line msg:(NSString *)fmt, ...
{
    va_list args;
    va_start(args, fmt);
    [self logMessage:func line:line format:fmt valist:args level:@"INFO"];
    va_end(args);

}

+ (void)yblogError:(const char *)func line:(int)line msg:(NSString *)fmt, ...
{
    va_list args;
    va_start(args, fmt);
    [self logMessage:func line:line format:fmt valist:args level:@"ERROR"];
    va_end(args);

}

+ (void)logMessage:(const char *)func line:(int)line format:(NSString *)fmt valist:(va_list)args level:(NSString *)level
{
    NSString *message = [[NSString alloc] initWithFormat:fmt arguments:args];
    NSLog(@"[%@]%s[LINE:%d] %@", level, func, line, message);
    message=nil;
   
}
@end
